<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ include file="/include/TagLib.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb18030" />
<title>QQ邮箱 - 编辑公司</title>
<link rel="stylesheet" type="text/css" href="<c:url value='index_files/comm20100f8b45.css' />" />
<link rel="stylesheet" type="text/css" href="<c:url value='index_files/getcss.css' />" />
<script language="javascript" src="<c:url value='/js/jquery-1.4.2.min.js' />"></script>
<script type="text/javascript">
	function check(){
		var companyNo = $("#companyNo").val();
		var companyName = $("#companyName").val();
		var email = $("#email").val();
		if(companyNo==null||companyNo==''||companyName==null||companyName==''){
			alert("公司代号和公司名称必须填写！");
			return false;
		}
		var emailPat=/^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
        if(!emailPat.test(email))
        {
             alert('请输入有效的Email！');
             return false;
        }
        return true;
	}
</script>
</head>
<body class="tbody" >
<form id="AddressEdit" name="AddressEdit" action="<c:url value='/updateCompany.do' />" method="POST" target="mainFrame" >
	<input type="hidden" name="idCompany" value="${company.idCompany}" />
	<input type="hidden" name="createDateTemp" value="${company.createDate}" />
	<input type="hidden" name="idUser" value="${company.idUser}" />
	<input type="hidden" name="idEmployee" value="${company.idEmployee}" />
<table width="100%" border="0" cellspacing="0" cellpadding="2" class="toolbg" >
	<tr>
		<td align="left" nowrap class="barspace toolbgline">
		<input type="submit" value=" 保存信息 " class="wd2 btn" onclick="return check();" /><input type="button" value=" 取消 " class="wd1 btn" onClick="history.go(-1);"/>
		</td>
	</tr>
</table>

<table width="100%" border="0" cellspacing="0" cellpadding="4" class="settingtable"  >
	<tbody>
	<tr>
		<td colspan="2"><div class="addr_line" style="font-size:14px;padding:8px 0 4px 2px;margin:4px 15px">编辑公司</div></td>
	</tr>	
	<tr class="normal black">
		<td width="120" style="text-align:right;"><div style="width:120px;white-space:nowrap;">公司代号：</div></td>
		<td width="96%" align="left">
			<input id="companyNo" type="text"  class="txt" size="28" name="companyNo" value="${company.companyNo}" />
			&nbsp;<font color="#FF0000">*</font></td>
	</tr>
	<tr class="normal black">
		<td width="120" style="text-align:right;"><div style="width:120px;white-space:nowrap;">公司名称：</div></td>
		<td width="96%" align="left">
			<input id="companyName" type="text"  class="txt" size="28" name="companyName" value="${company.companyName}" />
			&nbsp;<font color="#FF0000">*</font></td>
	</tr>
	<tr class="normal black">
		<td align="right">公司缩写：</td>
		<td align="left">
			<input id="companyShortName" type="text" name="companyShortName" class="txt noime" size="28" value="${company.companyShortName}" />
		</td>
	</tr>
	<tr class="normal black">
		<td align="right">公司地址：</td>
		<td align="left"><input type="text"  name="address" class="txt noime" size="28" value="${company.address}" /></td>
	</tr>
	<tr class="normal black">
		<td align="right">邮政编码：</td>
		<td align="left"><input type="text"  name="postCode" class="txt noime" size="28" value="${company.postCode}" /></td>
	</tr>
	<tr class="normal black">
		<td align="right">联系电话：</td>
		<td align="left"><input type="text"  name="telephone" class="txt" size="28" value="${company.telephone}" /></td>
	</tr>
	<tr class="normal black">
		<td align="right">传真：</td>
		<td align="left"><input type="text"  name="fax" class="txt" size="28" value="${company.fax}" /></td>
	</tr>
	<tr class="normal black">
		<td align="right">邮箱：</td>
		<td align="left"><input type="text" id="email" name="email" class="txt" size="28" value="${company.email}" />&nbsp;<font color="#FF0000">*</font></td>
	</tr>
	<tr class="normal black">
		<td align="right">网址：</td>
		<td align="left"><input type="text"  name="website" class="txt" size="28" value="${company.website}" /></td>
	</tr>
	<tr class="normal black">
		<td align="right">来源：</td>
		<td align="left"><input type="text"  name="source" class="txt" size="28" value="${company.source}" /></td>
	</tr>
	<tr class="normal black">
		<td align="right">主要产品：</td>
		<td align="left"><input type="text"  name="mainProducts" class="txt" size="28" value="${company.mainProducts}" /></td>
	</tr>
	<tr class="normal black">
		<td align="right">公司类型：</td>
		<td align="left">
			<select id="idCompany" style="width:192px;height:22px;" name="idCompanyType">
				<c:forEach items="${tblCompanyTypesList}" var="type" >
					<c:choose>
					<c:when test="${type.idCompanyType==company.idCompanyType}">
						<option value="${type.idCompanyType}" selected="selected">${type.companyTypeName}</option>
					</c:when>
					<c:otherwise>
						<option value="${type.idCompanyType}">${type.companyTypeName}</option>
					</c:otherwise>
			 		</c:choose>
			 	</c:forEach>
			 </select>
		</td>
	</tr>
	</tbody>
</table>

<table width="100%" border="0" cellspacing="0" cellpadding="2" class="toolbg" >
	<tr>
		<td align="left" nowrap class="barspace toolbgline">
			<input type="submit" value=" 保存信息 " class="wd2 btn" onclick="return check();" /><input type="button" value=" 取消 " class="wd1 btn" onClick="history.go(-1);"/>
		</td>
	</tr>
</table>
<input type="hidden" name="list_index" id="list_index" value="">
</form>
</body>
</html>